* Masterfile 

clear all 

*Generating folder paths 
global dofiles "C:\Users\cpsresearch\Dropbox (MIT)\Child protection research\ReplicationArchive_CodeOnly" //replace here with folder where do-files are saved 
global data "E:\Data" //replace here with folder where data is saved 
global paper "C:\Users\cpsresearch\Dropbox (MIT)\Child protection research\writing" //replace here with output folder 


*Running stata codes 
do "$dofiles\1. Merging CPS data sources.do"
//merges the different CPS data sources needed for the data analysis 

do "$dofiles\2. Creating ID variable and addressing duplicates.do" 
//creates masterfile for duplicate IDs in CPS data 

do "$dofiles\3. Merging duplicates in outcome data.do" 
//for individuals matched to an ID in CPS data, merging political outcomes data when CPS IDs have been determined to be duplicates 

do "$dofiles\4. Creating variables in CPS data.do"
//creates variables needed for analysis 

do "$dofiles\5. Merging CPS and Outcomes data.do" 
//imposing sample restrictions and creating main dataset for analysis 

do "$dofiles\6. Paper Tables and Figures.do" 
//tables and figures of paper 